let v = new Vue({
    el:'#main-container',
    data:{
        article:{

        },
    },
    methods:{
        addArticle:function () {
            axios({
                url:'main/article/addArticle',
                method:'post',
                data:this.article,
            }).then(resp => {
                if(resp.data.success){
                    location.href = "main/article/toArticle";
                }else{
                    layer.msg(resp.data.msg);
                }
            }).catch(error => {
                layer.msg(error.message);
            })
        }
    },
    created:function () {
        
    }
})